home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Add a EULA3153710282001.psc / EulaForm1.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  2001-10-28  |  4.8 KB  |  155 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Begin VB.Form FrmEula 
  4.    Caption         =   "Eula"
  5.    ClientHeight    =   5025
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5910
  9.    Icon            =   "EulaForm1.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5025
  12.    ScaleWidth      =   5910
  13.    StartUpPosition =   1  'CenterOwner
  14.    Begin RichTextLib.RichTextBox RichTextBox1 
  15.       Height          =   2850
  16.       Left            =   45
  17.       TabIndex        =   5
  18.       Top             =   1080
  19.       Width           =   5820
  20.       _ExtentX        =   10266
  21.       _ExtentY        =   5027
  22.       _Version        =   393217
  23.       BackColor       =   12632256
  24.       Enabled         =   0   'False
  25.       ScrollBars      =   2
  26.       TextRTF         =   $"EulaForm1.frx":0442
  27.    End
  28.    Begin VB.CommandButton CmdCancel 
  29.       Cancel          =   -1  'True
  30.       Caption         =   "Cancel"
  31.       Default         =   -1  'True
  32.       Height          =   375
  33.       Left            =   4500
  34.       TabIndex        =   0
  35.       Top             =   4560
  36.       Width           =   1245
  37.    End
  38.    Begin VB.CommandButton CmdNext 
  39.       Caption         =   "&Next >"
  40.       Enabled         =   0   'False
  41.       Height          =   375
  42.       Left            =   3165
  43.       TabIndex        =   4
  44.       Top             =   4560
  45.       Width           =   1245
  46.    End
  47.    Begin VB.CheckBox Check1 
  48.       Caption         =   "Yes, I &accept all of the terms of the preceeding license agreement"
  49.       Height          =   240
  50.       Left            =   195
  51.       TabIndex        =   3
  52.       Top             =   4020
  53.       Width           =   5325
  54.    End
  55.    Begin VB.Line Line2 
  56.       BorderColor     =   &H00FFFFFF&
  57.       X1              =   180
  58.       X2              =   5715
  59.       Y1              =   4410
  60.       Y2              =   4410
  61.    End
  62.    Begin VB.Line Line1 
  63.       BorderColor     =   &H00808080&
  64.       X1              =   180
  65.       X2              =   5715
  66.       Y1              =   4395
  67.       Y2              =   4395
  68.    End
  69.    Begin VB.Label Label2 
  70.       Caption         =   "End User License Agreement"
  71.       BeginProperty Font 
  72.          Name            =   "MS Sans Serif"
  73.          Size            =   8.25
  74.          Charset         =   0
  75.          Weight          =   700
  76.          Underline       =   0   'False
  77.          Italic          =   0   'False
  78.          Strikethrough   =   0   'False
  79.       EndProperty
  80.       Height          =   300
  81.       Left            =   105
  82.       TabIndex        =   2
  83.       Top             =   75
  84.       Width           =   4530
  85.    End
  86.    Begin VB.Label Label1 
  87.       Caption         =   $"EulaForm1.frx":0517
  88.       Height          =   675
  89.       Left            =   105
  90.       TabIndex        =   1
  91.       Top             =   360
  92.       Width           =   5610
  93.    End
  94. Attribute VB_Name = "FrmEula"
  95. Attribute VB_GlobalNameSpace = False
  96. Attribute VB_Creatable = False
  97. Attribute VB_PredeclaredId = True
  98. Attribute VB_Exposed = False
  99. Option Explicit
  100. Dim CancelExitFlg As Boolean
  101. Private Sub Check1_Click()
  102. CmdNext.Enabled = Not CmdNext.Enabled
  103. End Sub
  104. Private Sub CmdCancel_Click()
  105. ExitSetup Me, gintRET_EXIT
  106. End Sub
  107. Private Sub CmdNext_Click()
  108. Unload Me
  109. End Sub
  110. Private Sub Form_Load()
  111.     'Load Resource item 103 (a text file) into the textbox
  112.     Dim sFileName As String
  113.     Dim iFileNum  As Integer
  114.     Dim sText     As String
  115.     Dim Margins As Integer
  116.     CancelExitFlg = False
  117.     If GetTempFile("", "~rs", 0, sFileName) Then
  118.         If Not SaveResItemToDisk(101, "Custom", sFileName) Then
  119.            RichTextBox1.LoadFile sFileName
  120.            Margins = 100
  121.            With RichTextBox1
  122.               .SelStart = 1
  123.               .SelLength = Len(RichTextBox1.Text)
  124.               .SelIndent = Margins
  125.               .SelStart = 0
  126.            End With
  127.             'Delete the temp file
  128.             Kill sFileName
  129.         Else
  130.             MsgBox "Unable to save resource item to disk!", vbCritical
  131.             'Show/Hide Controls
  132.         End If
  133.     Else
  134.         MsgBox "Unable to get temp file name!", vbCritical
  135.         'Show/Hide Controls
  136.     End If
  137. End Sub
  138. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  139. 'If CancelExitFlg = True Then
  140. '   ExitSetup Me, gintRET_EXIT
  141. '   CancelExitFlg = False
  142. '   Exit Sub
  143. 'End If
  144. HandleFormQueryUnload UnloadMode, Cancel, Me
  145. End Sub
  146. Private Sub RichTextBox1_Click()
  147. Check1.SetFocus
  148. End Sub
  149. Private Sub RichTextBox1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  150. Check1.SetFocus
  151. End Sub
  152. Private Sub RichTextBox1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
  153. Check1.SetFocus
  154. End Sub
  155.